package com.chentongwei.facade.user.service.impl;

import com.chentongwei.common.entity.Result;
import com.chentongwei.core.user.biz.UserBiz;
import com.chentongwei.facade.user.entity.io.LoginIO;
import com.chentongwei.facade.user.entity.io.RegistUserIO;
import com.chentongwei.facade.user.service.IUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户业务接口实现类
 *
 * @author TongWei.Chen 2017-06-10 15:17
 **/
@Service("userService")
public class UserServiceImpl implements IUserService {
    private static final Logger LOG = LoggerFactory.getLogger(UserServiceImpl.class);

    @Autowired
    private UserBiz userBiz;

    @Override
    public Result regist(RegistUserIO userIO) {
       return userBiz.regist(userIO);
    }

    @Override
    public Result login(LoginIO loginIO) {
        return userBiz.login(loginIO);
    }

    @Override
    public Result getByEmail(String email) {
        return userBiz.getByEmail(email);
    }

    @Override
    public Result activeUser(Integer userId) {
       return userBiz.activeUser(userId);
    }

    @Override
    public Result deleteUnActiveUser() {
       return userBiz.deleteUnActiveUser();
    }
}